package kr.hkit.powerjava.chther14;

import java.awt.Component;
import java.awt.HeadlessException;

import javax.swing.BoxLayout;
import javax.swing.JButton;
import javax.swing.JFrame;
import javax.swing.JPanel;

/*class MyFrame extends JFrame{

	public MyFrame() throws HeadlessException {
		setTitle("BoxLayout");
		setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
		JPanel panel = new JPanel();
		
		panel.setLayout(new BoxLayout(panel, BoxLayout.Y_AXIS));
		
		makeButton(panel,"button1");
		makeButton(panel,"button2");
		makeButton(panel,"button3");
		makeButton(panel,"b4");
		makeButton(panel,"Long button5");
		add(panel);
		pack();
		setVisible(true);
	}
	private void makeButton(JPanel panel,String text){
		JButton button = new JButton(text);
		button.setAlignmentX(Component.CENTER_ALIGNMENT);
		panel.add(button);
	}
	
}*/
public class BoxTest {
	public static void main(String[] args) {
		boxframe f = new boxframe();
	}
}
